import Foundation
import imp
import objc
import os
import shutil
import sys
import StringIO

from DRCWindowController import *

class DRCPlugIn (objc.lookUpClass('SMUGFMPlugIn')):
    _windowController = None
    
    def plugInDidLoad(self):
        self.plugInManager().addPlugInMenuItemNamed_withParentMenuTitle_target_action_keyEquivalent_keyEquivalentModifierMask_(
            "Digital Room Correction...",
            None,
            self,
            'handleRunScript:userObject:',
            '',
            0)
        
        self._windowController = DRCWindowController.alloc().init()

    def handleRunScript_userObject_(self, windowController, userObject):
        self._windowController.FMWindowController = windowController
        self._windowController.showWindow_(self)
